import {defineStore} from 'pinia'
import {ref} from 'vue'
const usetoken = defineStore('token',()=>{
    const token = ref(null)
    const updateToken = (val) => token.value = val
    const removeToken = () =>token.value = null
    return {token,updateToken,removeToken}
},{ persist: true} )// 持久化 
export default usetoken